<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="generator" content="ApiGen 2.8.0" />

	<title>Class CI_Cart | tis</title>

	<script type="text/javascript" src="resources/combined.js?1735077957"></script>
	<script type="text/javascript" src="elementlist.js?2977522689"></script>
	<link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" />

</head>

<body>
<div id="left">
	<div id="menu">
		<a href="index.html" title="Overview"><span>Overview</span></a>


		<div id="groups">
			<h3>Packages</h3>
			<ul>
				<li class="active"><a href="package-CodeIgniter.html">CodeIgniter<span></span></a>
						<ul>
				<li><a href="package-CodeIgniter.Controllers.html">Controllers</a>
						</li>
				<li><a href="package-CodeIgniter.Drivers.html">Drivers</a>
						</li>
				<li class="active"><a href="package-CodeIgniter.Libraries.html">Libraries</a>
						</li>
				<li><a href="package-CodeIgniter.Models.html">Models</a>
						</li>
							</ul></li>
				<li><a href="package-None.html">None</a>
						</li>
			</ul>
		</div>

		<hr />


		<div id="elements">
			<h3>Classes</h3>
			<ul>
				<li><a href="class-Authhelper.html">Authhelper</a></li>
				<li><a href="class-CI_Benchmark.html">CI_Benchmark</a></li>
				<li><a href="class-CI_Cache.html">CI_Cache</a></li>
				<li><a href="class-CI_Cache_apc.html">CI_Cache_apc</a></li>
				<li><a href="class-CI_Cache_dummy.html">CI_Cache_dummy</a></li>
				<li><a href="class-CI_Cache_file.html">CI_Cache_file</a></li>
				<li><a href="class-CI_Cache_memcached.html">CI_Cache_memcached</a></li>
				<li><a href="class-CI_Calendar.html">CI_Calendar</a></li>
				<li class="active"><a href="class-CI_Cart.html">CI_Cart</a></li>
				<li><a href="class-CI_Config.html">CI_Config</a></li>
				<li><a href="class-CI_Controller.html">CI_Controller</a></li>
				<li><a href="class-CI_Driver.html">CI_Driver</a></li>
				<li><a href="class-CI_Driver_Library.html">CI_Driver_Library</a></li>
				<li><a href="class-CI_Email.html">CI_Email</a></li>
				<li><a href="class-CI_Encrypt.html">CI_Encrypt</a></li>
				<li><a href="class-CI_Exceptions.html">CI_Exceptions</a></li>
				<li><a href="class-CI_Form_validation.html">CI_Form_validation</a></li>
				<li><a href="class-CI_FTP.html">CI_FTP</a></li>
				<li><a href="class-CI_Hooks.html">CI_Hooks</a></li>
				<li><a href="class-CI_Image_lib.html">CI_Image_lib</a></li>
				<li><a href="class-CI_Input.html">CI_Input</a></li>
				<li><a href="class-CI_Javascript.html">CI_Javascript</a></li>
				<li><a href="class-CI_Jquery.html">CI_Jquery</a></li>
				<li><a href="class-CI_Lang.html">CI_Lang</a></li>
				<li><a href="class-CI_Loader.html">CI_Loader</a></li>
				<li><a href="class-CI_Log.html">CI_Log</a></li>
				<li><a href="class-CI_Migration.html">CI_Migration</a></li>
				<li><a href="class-CI_Model.html">CI_Model</a></li>
				<li><a href="class-CI_Output.html">CI_Output</a></li>
				<li><a href="class-CI_Pagination.html">CI_Pagination</a></li>
				<li><a href="class-CI_Parser.html">CI_Parser</a></li>
				<li><a href="class-CI_Profiler.html">CI_Profiler</a></li>
				<li><a href="class-CI_Router.html">CI_Router</a></li>
				<li><a href="class-CI_Security.html">CI_Security</a></li>
				<li><a href="class-CI_Session.html">CI_Session</a></li>
				<li><a href="class-CI_SHA1.html">CI_SHA1</a></li>
				<li><a href="class-CI_Table.html">CI_Table</a></li>
				<li><a href="class-CI_Trackback.html">CI_Trackback</a></li>
				<li><a href="class-CI_Unit_test.html">CI_Unit_test</a></li>
				<li><a href="class-CI_Upload.html">CI_Upload</a></li>
				<li><a href="class-CI_URI.html">CI_URI</a></li>
				<li><a href="class-CI_User_agent.html">CI_User_agent</a></li>
				<li><a href="class-CI_Utf8.html">CI_Utf8</a></li>
				<li><a href="class-CI_Xmlrpc.html">CI_Xmlrpc</a></li>
				<li><a href="class-CI_Xmlrpcs.html">CI_Xmlrpcs</a></li>
				<li><a href="class-CI_Zip.html">CI_Zip</a></li>
				<li><a href="class-MY_Controller.html">MY_Controller</a></li>
				<li><a href="class-Welcome.html">Welcome</a></li>
			</ul>





		</div>
	</div>
</div>

<div id="splitter"></div>

<div id="right">
<div id="rightInner">
	<form id="search">
		<input type="hidden" name="cx" value="" />
		<input type="hidden" name="ie" value="UTF-8" />
		<input type="text" name="q" class="text" />
		<input type="submit" value="Search" />
	</form>

	<div id="navigation">
		<ul>
			<li>
				<a href="index.html" title="Overview"><span>Overview</span></a>
			</li>
			<li>
				<a href="package-CodeIgniter.Libraries.html" title="Summary of CodeIgniter\Libraries"><span>Package</span></a>
			</li>
			<li class="active">
<span>Class</span>			</li>
		</ul>
		<ul>
			<li>
				<a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
			</li>
		</ul>
		<ul>
		</ul>
	</div>

<div id="content" class="class">
	<h1>Class CI_Cart</h1>


	<div class="description">
	
<p>Shopping Cart Class</p>

	</div>









	<div class="info">
		
		
		
		<b>Package:</b> <a href="package-CodeIgniter.html">CodeIgniter</a>\<a href="package-CodeIgniter.Libraries.html">Libraries</a><br />

				<b>Category:</b>
				Shopping Cart<br />
				<b>Author:</b>
				ExpressionEngine Dev Team<br />
				<b>Link:</b>
				<a href="http://codeigniter.com/user_guide/libraries/cart.html">http://codeigniter.com/user_guide/libraries/cart.html</a><br />
		<b>Located at</b> <a href="source-class-CI_Cart.html#18-548" title="Go to source code">system/libraries/Cart.php</a><br />
	</div>



	<table class="summary" id="methods">
	<caption>Methods summary</caption>
	<tr data-order="__construct" id="___construct">

		<td class="attributes"><code>
			 public 
			
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#___construct">#</a>
		<code><a href="source-class-CI_Cart.html#38-74" title="Go to source code">__construct</a>( <span>mixed <var>$params</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Shopping Class Constructor</p>

		</div>

		<div class="description detailed hidden">
			
<p>Shopping Class Constructor</p>

<p>The constructor loads the Session class, used to store the shopping cart
contents.</p>








		</div>
		</div></td>
	</tr>
	<tr data-order="insert" id="_insert">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_insert">#</a>
		<code><a href="source-class-CI_Cart.html#78-129" title="Go to source code">insert</a>( <span>array <var>$items</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Insert items into the cart and save it to the session table</p>

		</div>

		<div class="description detailed hidden">
			
<p>Insert items into the cart and save it to the session table</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$items</var></dt>
					<dd><code>array</code></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_insert" id="__insert">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__insert">#</a>
		<code><a href="source-class-CI_Cart.html#133-248" title="Go to source code">_insert</a>( <span>array <var>$items</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Insert</p>

		</div>

		<div class="description detailed hidden">
			
<p>Insert</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$items</var></dt>
					<dd><code>array</code></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="update" id="_update">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_update">#</a>
		<code><a href="source-class-CI_Cart.html#252-307" title="Go to source code">update</a>( <span>array <var>$items</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Update the cart</p>

		</div>

		<div class="description detailed hidden">
			
<p>Update the cart</p>

<p>This function permits the quantity of a given item to be changed. Typically
it is called from the "view cart" page if a user makes changes to the quantity
before checkout. That array must contain the product ID and quantity for each
item.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$items</var></dt>
					<dd><code>array</code></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_update" id="__update">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__update">#</a>
		<code><a href="source-class-CI_Cart.html#311-359" title="Go to source code">_update</a>( <span>array <var>$items</var> = <span class="php-keyword1">array</span>()</span> )</code>

		<div class="description short">
			
<p>Update the cart</p>

		</div>

		<div class="description detailed hidden">
			
<p>Update the cart</p>

<p>This function permits the quantity of a given item to be changed. Typically
it is called from the "view cart" page if a user makes changes to the quantity
before checkout. That array must contain the product ID and quantity for each
item.</p>



				<h4>Parameters</h4>
				<div class="list"><dl>
					<dt><var>$items</var></dt>
					<dd><code>array</code></dd>
				</dl></div>

				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="_save_cart" id="__save_cart">

		<td class="attributes"><code>
			 public 
			boolean
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#__save_cart">#</a>
		<code><a href="source-class-CI_Cart.html#363-412" title="Go to source code">_save_cart</a>( )</code>

		<div class="description short">
			
<p>Save the cart array to the session DB</p>

		</div>

		<div class="description detailed hidden">
			
<p>Save the cart array to the session DB</p>




				<h4>Returns</h4>
				<div class="list">
					<code>boolean</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="total" id="_total">

		<td class="attributes"><code>
			 public 
			integer
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_total">#</a>
		<code><a href="source-class-CI_Cart.html#416-425" title="Go to source code">total</a>( )</code>

		<div class="description short">
			
<p>Cart Total</p>

		</div>

		<div class="description detailed hidden">
			
<p>Cart Total</p>




				<h4>Returns</h4>
				<div class="list">
					<code>integer</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="total_items" id="_total_items">

		<td class="attributes"><code>
			 public 
			integer
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_total_items">#</a>
		<code><a href="source-class-CI_Cart.html#429-440" title="Go to source code">total_items</a>( )</code>

		<div class="description short">
			
<p>Total Items</p>

		</div>

		<div class="description detailed hidden">
			
<p>Total Items</p>

<p>Returns the total item count</p>




				<h4>Returns</h4>
				<div class="list">
					<code>integer</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="contents" id="_contents">

		<td class="attributes"><code>
			 public 
			array
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_contents">#</a>
		<code><a href="source-class-CI_Cart.html#444-461" title="Go to source code">contents</a>( )</code>

		<div class="description short">
			
<p>Cart Contents</p>

		</div>

		<div class="description detailed hidden">
			
<p>Cart Contents</p>

<p>Returns the entire cart array</p>




				<h4>Returns</h4>
				<div class="list">
					<code>array</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="has_options" id="_has_options">

		<td class="attributes"><code>
			 public 
			array
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_has_options">#</a>
		<code><a href="source-class-CI_Cart.html#465-482" title="Go to source code">has_options</a>( <span>mixed <var>$rowid</var> = <span class="php-quote">''</span></span> )</code>

		<div class="description short">
			
<p>Has options</p>

		</div>

		<div class="description detailed hidden">
			
<p>Has options</p>

<p>Returns TRUE if the rowid passed to this function correlates to an item that
has options associated with it.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>array</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="product_options" id="_product_options">

		<td class="attributes"><code>
			 public 
			array
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_product_options">#</a>
		<code><a href="source-class-CI_Cart.html#486-502" title="Go to source code">product_options</a>( <span>mixed <var>$rowid</var> = <span class="php-quote">''</span></span> )</code>

		<div class="description short">
			
<p>Product options</p>

		</div>

		<div class="description detailed hidden">
			
<p>Product options</p>

<p>Returns the an array of options, for a particular product row ID</p>




				<h4>Returns</h4>
				<div class="list">
					<code>array</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="format_number" id="_format_number">

		<td class="attributes"><code>
			 public 
			integer
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_format_number">#</a>
		<code><a href="source-class-CI_Cart.html#506-525" title="Go to source code">format_number</a>( <span>mixed <var>$n</var> = <span class="php-quote">''</span></span> )</code>

		<div class="description short">
			
<p>Format Number</p>

		</div>

		<div class="description detailed hidden">
			
<p>Format Number</p>

<p>Returns the supplied number with commas and a decimal point.</p>




				<h4>Returns</h4>
				<div class="list">
					<code>integer</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	<tr data-order="destroy" id="_destroy">

		<td class="attributes"><code>
			 public 
			null
			
			</code>
		</td>

		<td class="name"><div>
		<a class="anchor" href="#_destroy">#</a>
		<code><a href="source-class-CI_Cart.html#529-545" title="Go to source code">destroy</a>( )</code>

		<div class="description short">
			
<p>Destroy the cart</p>

		</div>

		<div class="description detailed hidden">
			
<p>Destroy the cart</p>

<p>Empties the cart and kills the session</p>




				<h4>Returns</h4>
				<div class="list">
					<code>null</code><br />
				</div>




		</div>
		</div></td>
	</tr>
	</table>












	<table class="summary" id="properties">
	<caption>Properties summary</caption>
	<tr data-order="product_id_rules" id="$product_id_rules">
		<td class="attributes"><code>
			public  
			string
		</code></td>

		<td class="name">
				<a href="source-class-CI_Cart.html#30" title="Go to source code"><var>$product_id_rules</var></a>
		</td>
		<td class="value"><code><span class="php-quote">'\.a-z0-9_-'</span></code></td>
		<td class="description"><div>
			<a href="#$product_id_rules" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="product_name_rules" id="$product_name_rules">
		<td class="attributes"><code>
			public  
			string
		</code></td>

		<td class="name">
				<a href="source-class-CI_Cart.html#31" title="Go to source code"><var>$product_name_rules</var></a>
		</td>
		<td class="value"><code><span class="php-quote">'\.\:\-_ a-z0-9'</span></code></td>
		<td class="description"><div>
			<a href="#$product_name_rules" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="CI" id="$CI">
		<td class="attributes"><code>
			public  
			mixed
		</code></td>

		<td class="name">
				<a href="source-class-CI_Cart.html#34" title="Go to source code"><var>$CI</var></a>
		</td>
		<td class="value"><code></code></td>
		<td class="description"><div>
			<a href="#$CI" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	<tr data-order="_cart_contents" id="$_cart_contents">
		<td class="attributes"><code>
			public  
			array
		</code></td>

		<td class="name">
				<a href="source-class-CI_Cart.html#35" title="Go to source code"><var>$_cart_contents</var></a>
		</td>
		<td class="value"><code><span class="php-keyword1">array</span>()</code></td>
		<td class="description"><div>
			<a href="#$_cart_contents" class="anchor">#</a>

			<div class="description short">
				
			</div>

			<div class="description detailed hidden">
				

			</div>
		</div></td>
	</tr>
	</table>






</div>

	<div id="footer">
		tis API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a>
	</div>
</div>
</div>
</body>
</html>
